// const path = require("path");
// function resolve(dir) {
//   return path.join(__dirname, dir);
// }

module.exports = {
  publicPath: "./",
  configureWebpack: {
    externals: {
      // "element-ui": "ELEMENT",
      // vue: "Vue",
    },
  },
  // chainWebpack: (config) => {
  //   config.resolve.alias
  //     .set("@", resolve("./src"))
  //     .set("developPageImage", resolve("./developPageImage"));
  //   // .set("base", resolve("baseConfig"))
  //   // .set("public", resolve("public"));
  // },
  pluginOptions: {
    electronBuilder: {
      builderOptions: {
        extraFiles: "./website_template",
        appId: "可视化网页搭建",
        productName: "可视化网页搭建", //项目名，也是生成的安装文件名，即aDemo.exe
        copyright: "Copyright © cyp", //版权信息
        directories: {
          output: "./dist_electron", //输出文件路径
        },
        win: {
          //win相关配置
          //icon: "./shanqis.ico", //图标，当前图标在根目录下，注意这里有两个坑
          target: [
            {
              target: "nsis", //利用nsis制作安装程序
              // arch: [
              //   "x64", //64位
              //   "ia32", //32位
              // ],
            },
          ],
        },
      },
    },
  },
};
